Skip to content

POC: i18n no admin de eventos (locale switcher + traduções)#384

Open
BrunaDomingues wants to merge 3 commits into
he4rt:feat/eventsfrom
BrunaDomingues:poc/events-i18n
Open

POC: i18n no admin de eventos (locale switcher + traduções)#384
BrunaDomingues wants to merge 3 commits into
he4rt:feat/eventsfrom
BrunaDomingues:poc/events-i18n

Conversation

@BrunaDomingues

Copy link
Copy Markdown

Summary

POC para validar traduções no admin de eventos, com commits separados por escopo.

  • Adiciona seletor de idioma EN/PT-BR no menu do usuário do Filament (estilo theme switcher), com persistência em sessão
  • Formata datas do Filament conforme o locale ativo (ex.: 29/06/2026 em PT-BR)
  • Traduz labels do resource de eventos no panel-admin (tabelas, formulários, relation managers e notificações)

Commits

  1. feat(i18n): add Filament user menu locale switcher — menu + infraestrutura de locale (revertível isoladamente)
  2. feat(i18n): format Filament dates by application locale — Carbon + formatos no Filament
  3. feat(panel-admin): translate events Filament resource labels — arquivos lang/events.php e resources

Notas

  • O commit do locale switcher foi isolado de propósito: se não for para produção, dá para reverter só ele com git revert <hash>.
  • Enum values (ex.: status da inscrição) já usavam events::enums.*; este PR cobre principalmente strings hardcoded do admin.
  • Requer assets do Vite atualizados (npm run dev ou npm run build) para o estilo do seletor de idioma.

Test plan

  • Trocar idioma no menu do usuário (admin e app) e recarregar a página
  • Verificar labels do resource de eventos em PT-BR (Inscrições, Participante, etc.)
  • Verificar formato de datas em PT-BR (d/m/Y H:i:s) vs EN (M j, Y H:i:s)
  • php artisan test tests/Feature/LocaleSwitcherTest.php
  • php artisan test app-modules/events/tests/Feature/EventResourceTest.php

BrunaDomingues and others added 3 commits July 2, 2026 00:21
Session-based EN/PT-BR switching in the Filament user menu, with route, middleware, and UI styled like the theme switcher.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sync Carbon locale with the session language and apply locale-specific date formats in Filament tables, schemas, and pickers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add panel-admin events lang files and replace hardcoded English strings in the events admin UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@BrunaDomingues BrunaDomingues self-assigned this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant